home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / bc_pas_2.zip / BINARY.H next >
Text File  |  1992-06-26  |  6KB  |  198 lines

  1. /*$Author:   DCODY  $*/
  2. /*$Date:   25 Jun 1992 23:21:50  $*/
  3. /*$Header:   W:/sccs/inc/binary.h_v   1.1   25 Jun 1992 23:21:50   DCODY  $*/
  4. /*$Log:   W:/sccs/inc/binary.h_v  $
  5.  * 
  6.  *    Rev 1.1   25 Jun 1992 23:21:50   DCODY
  7.  * added generic SB mixer channel equates
  8.  * 
  9.  *    Rev 1.0   15 Jun 1992 09:58:34   BCRANE
  10.  * Initial revision.
  11. */
  12. /*$Logfile:   W:/sccs/inc/binary.h_v  $*/
  13. /*$Modtimes$*/
  14. /*$Revision:   1.1  $*/
  15. /*$Workfile:   binary.h  $*/
  16.  
  17.     /*\
  18.     |*|----====< BINARY.H >====----
  19.     |*|
  20.     |*| Copyright (c) 1991, Media Vision, Inc.    All Rights Reserved.
  21.     |*|
  22.     \*/
  23.  
  24. /*
  25. // commands issued to the 2F interface
  26. */
  27.  
  28. #define BI_INSTALLCHECK 0        /* Check if the driver is installed */
  29. #define BI_GETVERSION    1        /* Get the version #            */
  30. #define BI_GETSTATE    2        /* Get the state pointer and size   */
  31. #define BI_GETFUNCTION    3        /* Get the function table pointer   */
  32. #define BI_GETDMAIRQ    4        /* Get the DMA/IRQ/INT number        */
  33. #define BI_SENDCMD    5        /* reserved                */
  34. #define BI_GETSTATUSSTR 6        /* Get the status string        */
  35. #define BI_reserved1    7        /* reserved                */
  36. #define BI_reserved2    8        /* reserved                */
  37. #define BI_reserved3    9        /* reserved                */
  38. #define BI_SETSCANCODE    10        /* set the hot key scan codes        */
  39. #define BI_GETPATH    11        /* get the file path            */
  40.  
  41. /*
  42. // TRUE/FALSE & ON/OFF logic values
  43. */
  44.  
  45. #define BI_TRUE     -1
  46. #define BI_FALSE    0
  47.  
  48. #define BI_ON        BI_TRUE     /* on state                */
  49. #define BI_OFF        BI_FALSE    /* off state                */
  50.  
  51. #define BI_INT2FCODE1    0xBC        /* Bryan's initials                 */
  52.  
  53. /* int 2F ID (func 0) return register values                    */
  54.  
  55. #define BI_INT2FREGBX    0x6D00        /* 'm '                             */
  56. #define BI_INT2FREGCX    0x0076        /* ' v'                             */
  57. #define BI_INT2FREGDX    0x2020        /* UPPERCASE XOR MASK            */
  58.  
  59. /*
  60. // Command Block Structure
  61. */
  62.  
  63.     typedef struct {
  64.  
  65.       unsigned int bc_blockID;    /* language command block     (mandatory)  */
  66.  
  67.       unsigned int bc_devcode;    /* device code (MIXER/VOLUME/CROSS/FILTER...) */
  68.  
  69.       unsigned int bc_deviceselect; /* INPUT|OUTPUT mixer select & more...          */
  70.  
  71.       unsigned int bc_fromflag;    /* [FROM <term>] TRUE/FALSE              */
  72.       unsigned int bc_fromtype;    /* type fromvalue is type # or %          */
  73.       unsigned int bc_fromvalue;    /* value derived from <term>              */
  74.  
  75.       unsigned int bc_toflag;    /* [TO <term>] TRUE/FALSE     (mandatory)  */
  76.       unsigned int bc_totype;    /* type fromvalue is type # or %          */
  77.       unsigned int bc_tovalue;    /* value derived from <term>              */
  78.  
  79.       unsigned int breserved1;    /* reserved for internal use              */
  80.  
  81.       unsigned int bc_leftchflag;    /* set left channel  TRUE/FALSE           */
  82.       unsigned int bc_leftchannel;    /* left channel #                  */
  83.  
  84.       unsigned int bc_ritchflag;    /* set right channel TRUE/FALSE           */
  85.       unsigned int bc_ritchannel;    /* right channel #                  */
  86.  
  87.       unsigned int bc_secondsflag;    /* TRUE/FALSE to do it over time          */
  88.       unsigned int bc_secondcount;    /* # of seconds to spread out the command     */
  89.  
  90.       unsigned int breserved2;    /* reserved for internal use              */
  91.  
  92.       unsigned int bc_errorcode;    /* holds the error number              */
  93.       unsigned long bc_targetstr;    /* user's target string pointer               */
  94.  
  95.     } cmdblk;
  96.  
  97. /*
  98. // blockID Commands
  99. */
  100.  
  101. #define BI_RESETCMD    0        /* Reset the hardware settings              */
  102. #define BI_SETCMD    1        /* SET parsed language block              */
  103. #define BI_GETCMD    2        /* GET parsed language block              */
  104. #define BI_HOLDCMD    3        /* Hold the queue                  */
  105. #define BI_RELCMD    4        /* Release the queue                  */
  106.  
  107. /*
  108. // execode Commands
  109. */
  110.  
  111. #define BI_CROSSCMD    0        /* command is for the cross channel          */
  112. #define BI_FILTERCMD    1        /* command is for the filter              */
  113. #define BI_MIXERCMD    2        /* command is for the mixer              */
  114. #define BI_REALCMD    3        /* command is for the real sound switch       */
  115. #define BI_VOLUMECMD    4        /* command is for the volume              */
  116.  
  117. #define BI_LASTEXECMD    VOLUMECMD    /* Last valid command                  */
  118.  
  119. /*
  120. // different logic flags for a TO condition (c_xxxxflag)
  121. */
  122.  
  123. #define BI_DONTSET    0        /* don't process FROM value                   */
  124. #define BI_SETFROM    -1        /* FROM setting is available              */
  125. #define BI_SETTO    -1        /* TO setting is available (mandatory)          */
  126. #define BI_UPTO     -2        /* set up from current setting              */
  127. #define BI_DOWNTO    -3        /* set down from current setting          */
  128.  
  129. /*
  130. // types of numeric data in FROM and TO fields (c_xxxxtype)
  131. */
  132.  
  133. #define BI_TYPEINT    1        /* "getterm" return type                      */
  134. #define BI_TYPEPCT    2        /* "getterm" return type                      */
  135.  
  136. /*
  137. // deviceselect values (c_deviceselect)
  138. //
  139. //     (none for the filter)
  140. */
  141.  
  142. /*     for mixers                                */
  143.  
  144. #define BI_OUTPUTMIXER    0x00        /* output mixer H/W select              */
  145. #define BI_INPUTMIXER    0x40        /* input mixer select                  */
  146. #define BI_DEFMIXER    0xff        /* use the default mixer              */
  147.  
  148. /*     for cross channel                            */
  149.  
  150. #define BI_RIGHT2RIGHT    0x01        /* right to right                  */
  151. #define BI_LEFT2RIGHT    0x02        /* left  to right                  */
  152. #define BI_RIGHT2LEFT    0x04        /* right to left                  */
  153. #define BI_LEFT2LEFT    0x08        /* left  to left                  */
  154.  
  155. /*     for volume control                            */
  156.  
  157. #define BI_VOLLOUD    0x00        /* LOUDNESS switch                  */
  158. #define BI_VOLENHANCE    0x01        /* ENHANCED stereo                  */
  159. #define BI_VOLBASS    0x02        /* BASS (0-12)                      */
  160. #define BI_VOLTREBLE    0x03        /* TREBLE (0-12)                  */
  161. #define BI_VOLLEFT    0x04        /* LEFT VOLUME    (0-40)                  */
  162. #define BI_VOLRIGHT    0x05        /* RIGHT VOLUME (0-40)                  */
  163. #define BI_VOLMODE    0x06        /* MODE  (LEFT/STEREO/RIGHT)              */
  164.  
  165. #define BI_bVOLLOUD    0x01        /* enhanced bass bit                  */
  166. #define BI_bVOLENH    0x02        /* enhanced stereo bit                  */
  167.  
  168. /*
  169. // left/right mixer channel selection
  170. */
  171.  
  172. /*     left channel values                            */
  173.  
  174. #define BI_L_FM     0x01
  175. #define BI_L_IMIXER    0x02
  176. #define BI_L_EXT    0x03
  177. #define BI_L_INT    0x04
  178. #define BI_L_MIC    0x05
  179. #define BI_L_PCM    0x06
  180. #define BI_L_SPEAKER    0x07
  181. #define BI_L_SBDAC    0x00
  182.  
  183. /*     right channel values                            */
  184.  
  185. #define BI_R_FM     0x08
  186. #define BI_R_IMIXER    0x09
  187. #define BI_R_EXT    0x0A
  188. #define BI_R_INT    0x0B
  189. #define BI_R_MIC    0x0C
  190. #define BI_R_PCM    0x0D
  191. #define BI_R_SPEAKER    0x0E
  192. #define BI_R_SBDAC    0x0F
  193.  
  194. /*
  195. // end of binary.h
  196. */
  197.  
  198.